﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace TapMe.View
{
    public partial class SummaryPage : PhoneApplicationPage
    {
        private const string MAIN_PAGE = "/View/MainPage.xaml";

        public SummaryPage()
        {
            InitializeComponent();
        }

        private void QuitButtonHandler(object sender, EventArgs e)
        {
            if (MessageBox.Show("Are you sure?", "QUIT", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
            {
                NavigationService.Navigate(new Uri(MAIN_PAGE, UriKind.Relative));
            }
        }

        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            if (NavigationService.CanGoBack)
            {
                NavigationService.RemoveBackEntry();
            }
            base.OnNavigatedFrom(e);
        }

        private void NextButtonHandler(object sender, EventArgs e)
        {
            MessageBox.Show("Next!");
        }
    }
}